package com.bosicloud.cmb.ibp.aws.adapter.commom.dto;

import lombok.*;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author Jack Peng / ziliang.peng@bosicloud.com
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ToString
@SuppressWarnings("ALL")
public class CreateAwsEnvDTO {

    @NotNull
    @NotBlank(message = "Token 不能为空")
    String token;

    @NotNull
    @NotBlank(message = "AccessKey 不能为空")
    String accessKey;

    @NotNull
    @NotBlank(message = "SecretKey 不能为空")
    String secretKey;

    /**
     * AWS区域
     */
    @NotNull
    @NotBlank(message = "Region 不能为空")
    String region;

    /**
     * ECS集群实例数量
     */
    @NotNull
    @Min(2)
    @Max(10)
    Integer asgMaxSize;

    @NotNull
    @NotBlank(message = "EC2实例类型 不能为空")
    String ecsInstanceType;

    @Length(max = 10)
    @NotBlank(message = "ECS集群名称不能为空")
    String ecsClusterName;

    @NotNull
    @NotBlank(message = "Config Git URL 不能为空")
    String configGitUrl;

    @NotNull
    String configGitUser = "";

    @NotNull
    String configGitPassword = "";

    @NotNull
    @NotBlank(message = "KeyPair 名称不能为空")
    String keyPairName = "";

    //@NotNull
    //@NotBlank(message = "公网安全组名称不能为空")
    //String pubSecurityGroup;

    @NotNull
    @NotBlank(message = "ECS安全组名称不能为空")
    String ecsSecurityGroup;

    @NotNull
    @NotBlank(message = "LB安全组名称不能为空")
    String lbSecurityGroup;

    @NotNull
    @NotBlank(message = "VPC ID 不能为空")
    String vpnId;

    //@NotNull
    //@NotBlank(message = "公有子网ID组不能为空")
    //String pubSubnetIds;

    @NotNull
    @NotBlank(message = "私有子网ID组不能为空")
    String subnetIds;

    @NotNull
    @NotBlank(message = "ECS Role不能为空")
    String ecsRole;

    @NotNull
    @NotBlank(message = "EC2 Role不能为空")
    String ec2Role;

    String s3template;
}
